package tsg.component;

import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import android.widget.TextView;


public abstract class TSGActivity extends android.app.Activity
{
	private static class TSGAndroidLayout extends LinearLayout
	{
		public TSGAndroidLayout(Context context) 
		{
			super(context);
			
			this.setOrientation(LinearLayout.HORIZONTAL);
		}
    
	}
	
	
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
//        
//        if(_layout == null)
//        {
//        	_layout = new TSGAndroidLayout(this);
//        }
//        
//        this.setContentView(new LinearLayout(this));
//        
        this.main();
        
        TextView label = new TextView(this);  
        label.setText("Hello!");  
        label.setTextSize(20);  
        label.setGravity(Gravity.CENTER_HORIZONTAL);  
      
        LinearLayout ll = new LinearLayout(this);  
        ll.setOrientation(LinearLayout.VERTICAL);  
        ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));  
        ll.setGravity(Gravity.CENTER);  
        ll.addView(label);  
 
        setContentView(ll);  
    }
    
    public abstract void main();
    private TSGAndroidLayout _layout = null;
}








